/**
 * 
 */
package com.eis.persist.model.function;

import java.io.Serializable;
import java.util.Map;

import com.eis.persist.model.base.BasePersist;

/**
 * @author sh-panwei01
 *
 */
public class PersistFunctionLayoutGroup extends BasePersist implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -6277919763328830163L;
	private int id;
	private int bizsysId;
	private String defaultDisplayName;
	private String customizeDisplayName;
	private String description;
	public PersistFunctionLayoutGroup(int id, String defaultDisplayName, String customizeDisplayName, String description, int bizsysId) {
		this.id = id;
		this.defaultDisplayName = defaultDisplayName;
		this.customizeDisplayName = customizeDisplayName;
		this.description = description;
		this.bizsysId = bizsysId;
	}
	
	public PersistFunctionLayoutGroup(Map<String, Object> layoutGroup) {
		this.id = (Integer)layoutGroup.get("id");
		this.defaultDisplayName = (String) layoutGroup.get("defaultDisplayname");
		this.customizeDisplayName = (String) layoutGroup.get("customizedDisplayName");
		this.description = (String) layoutGroup.get("description");
		this.bizsysId = (Integer)layoutGroup.get("bizsysId");
	}
	public PersistFunctionLayoutGroup() {
		
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getDefaultDisplayName() {
		return defaultDisplayName;
	}
	public void setDefaultDisplayName(String defaultDisplayName) {
		this.defaultDisplayName = defaultDisplayName;
	}
	public String getCustomizeDisplayName() {
		return customizeDisplayName;
	}
	public void setCustomizeDisplayName(String customizeDisplayName) {
		this.customizeDisplayName = customizeDisplayName;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getName() {
		if (customizeDisplayName != null && customizeDisplayName.length() > 0) {
			return customizeDisplayName;
		} else {
			return defaultDisplayName;
		}
	}
	public int getBizsysId() {
		return bizsysId;
	}
	public void setBizsysId(int bizsysId) {
		this.bizsysId = bizsysId;
	}
}
